import { createSlice } from '@reduxjs/toolkit'

const initialState = {
  pic:'',
  Nickname:'',
}

export const listSlice = createSlice({
  name: 'list',
  initialState,
  reducers: {
    setListSlice(state,action){
        state.Nickname=action.payload.Nickname
        state.pic=action.payload.pic
    }
  },
})

// Action creators are generated for each case reducer function
export const { setListSlice } = listSlice.actions

export default listSlice.reducer